package mark.tom.fiter;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import mark.tom.fiter.bean.config.RequestConfig;
import mark.tom.fiter.constants.StatusCodeEnums;

public interface NetErrorInterceptor {

    @StatusCodeEnums
    int intercept(@NonNull Throwable throwable);

    void handle(@StatusCodeEnums int statusCode, @Nullable String msg, @Nullable RequestConfig mRequestConfig);

    abstract class Factory {

        public abstract NetErrorInterceptor get();
    }
}
